package net.icontents.service.impl;

import java.util.List;

import javax.annotation.Resource;

import net.icontents.beans.User;
import net.icontents.dao.UserDao;
import net.icontents.service.UserService;

import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {
	
	/**
	 * 
	 */
	@Resource
	private UserDao userDao;
	
	@Override
	public void setBaseDaoHandlewired() {
		setBaseDao(userDao);
	}

	@Override
	public User getUserByEmail(String email) {
		return userDao.getUserByEmail(email);
	}

	@Override
	public User getUserByUserName(String userName) {
		return userDao.getUserByUserName(userName);
	}

	@Override
	public List<User> searchUser(String email) {
		return userDao.searchUser(email);
	}

	@Override
	public int searchUserCount(String email) {
		return userDao.searchUserCount(email);
	}

	@Override
	public boolean isExist(String userName, String email) {
		return userDao.isExist(userName,email);
	}

	@Override
	public boolean updateUserLevel(int id, int level) {
		return userDao.updateUserLevel(id, level);
	}

	@Override
	public boolean updateUserPassword(int id, String password) {
		return userDao.updateUserPassword(id, password);
	}
}
